package com.gitee.wsl.compose.chart.polar.style

import androidx.compose.runtime.Composable
import androidx.compose.ui.unit.Dp
import com.gitee.wsl.common.ui.draw.style.AreaStyle
import com.gitee.wsl.common.ui.draw.style.LineStyle
import com.gitee.wsl.compose.chart.KoalaPlotTheme
import com.gitee.wsl.compose.chart.polar.RadialGridType

/**
 * Properties used to customize the visuals and layout of a [PolarGraph].
 * @param radialGridType The type of radial grid lines to use - circles or line segments between radial axis line.
 * @param radialAxisGridLineStyle Styling for the radial axis grid lines
 * @param angularAxisGridLineStyle Styling for the angular axis grid lines
 * @param angularLabelGap Distance of the angular axis labels from the plot's outermost grid line
 * @param radialLabelGap Distance between the radial labels and the axis line
 * @param background The style to apply to the background of the plot area that contains the gridlines.
 */
 data class PolarGraphStyle(
    val radialGridType: RadialGridType,
    val radialAxisGridLineStyle: LineStyle?,
    val angularAxisGridLineStyle: LineStyle?,
    val angularLabelGap: Dp,
    val radialLabelGap: Dp,
    val background: AreaStyle?
)

/**
 * Contains default values for [PolarGraph]s.
 */
 object PolarGraphDefaults {
    /**
     * Default values for [PolarGraphStyle].
     */
    @Composable
    fun Default(): PolarGraphStyle = PolarGraphStyle(
        RadialGridType.CIRCLES,
        KoalaPlotTheme.axisThemeStyle.majorGridlineStyle,
        KoalaPlotTheme.axisThemeStyle.majorGridlineStyle,
        KoalaPlotTheme.plotSizes.gap,
        KoalaPlotTheme.plotSizes.gap,
        null
    )
}